<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="Ease,com.greensock.easing.Ease,getRatio" name="keywords">
<title>com.greensock.easing.Ease</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Ease - API Documentation';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?com/greensock/easing/Ease.html&amp;com/greensock/easing/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Ease</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Ease"); titleBar_setSubNav(false,false,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.greensock.easing</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Ease</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Subclasses</td><td><a href="../easing/BackIn.html">BackIn</a>, <a href="../easing/BackInOut.html">BackInOut</a>, <a href="../easing/BackOut.html">BackOut</a>, <a href="../easing/BounceIn.html">BounceIn</a>, <a href="../easing/BounceInOut.html">BounceInOut</a>, <a href="../easing/BounceOut.html">BounceOut</a>, <a href="../easing/CircIn.html">CircIn</a>, <a href="../easing/CircInOut.html">CircInOut</a>, <a href="../easing/CircOut.html">CircOut</a>, <a href="../easing/CubicIn.html">CubicIn</a>, <a href="../easing/CubicInOut.html">CubicInOut</a>, <a href="../easing/CubicOut.html">CubicOut</a>, <a href="../easing/ElasticIn.html">ElasticIn</a>, <a href="../easing/ElasticInOut.html">ElasticInOut</a>, <a href="../easing/ElasticOut.html">ElasticOut</a>, <a href="../easing/ExpoIn.html">ExpoIn</a>, <a href="../easing/ExpoInOut.html">ExpoInOut</a>, <a href="../easing/ExpoOut.html">ExpoOut</a>, <a href="../easing/Linear.html">Linear</a>, <a href="../easing/OutIn.html">OutIn</a>, <a href="../easing/QuadIn.html">QuadIn</a>, <a href="../easing/QuadInOut.html">QuadInOut</a>, <a href="../easing/QuadOut.html">QuadOut</a>, <a href="../easing/QuartIn.html">QuartIn</a>, <a href="../easing/QuartInOut.html">QuartInOut</a>, <a href="../easing/QuartOut.html">QuartOut</a>, <a href="../easing/QuintIn.html">QuintIn</a>, <a href="../easing/QuintInOut.html">QuintInOut</a>, <a href="../easing/QuintOut.html">QuintOut</a>, <a href="../easing/SineIn.html">SineIn</a>, <a href="../easing/SineInOut.html">SineInOut</a>, <a href="../easing/SineOut.html">SineOut</a>, <a href="../easing/StrongIn.html">StrongIn</a>, <a href="../easing/StrongInOut.html">StrongInOut</a>, <a href="../easing/StrongOut.html">StrongOut</a></td>
</tr>
</table>
<p></p>
 Base class for all GreenSock easing equations. In its simplest form, an Ease
 is responsible for translating linear time (typically represented as a number
 between 0 and 1 where 0 is the beginning, 0.5 is halfway complete, and 1 is 
 the end) into a value that has a different rate of change but still starts
 at 0 and ends at 1. In the GreenSock platform, eases are used to give 
 tweens/animations the look and feel that the animator desires. For example, 
 a ball rolling to a stop would decelerate over time (easeOut) rather than using 
 a linear velocity. An Elastic ease could be used to make an object appear as 
 though it is loosely attached somewhere and is snapping into place with loose 
 (or tight) tension. 
 
 <p>All Ease instances have a <code>getRatio()</code> method that is responsible
 for the translation of the progress ratio which the tween typically feeds in. 
 End users almost never need to directly feed any values to or get any values from
 an Ease instance - the tweens will do that internally.</p>
 
 <p>The base Ease class handles most of the common power-based easeIn/easeOut/eaesInOut 
 calculations (like Linear, Quad, Cubic, Quart, Quint, and Strong) internally. 
 You can define a separate function that uses what was considered the 4 standard 
 easing parameters by Adobe and many others (time, start, change, duration) and 
 Ease will serve as a proxy in order to maximize backwards compatibility and usability. 
 For example, if you have a custom method that you created like this:</p>
 <div class='listing'><pre>
function myEase(t:Number, s:Number, c:Number, d:Number):Number {
    return s+(t=t/d);
}
</pre></div>
 You could still use that by wrapping Ease around it like this:
 <div class='listing'><pre>
import com.greensock.*;
import com.greensock.easing.*;
 
TweenLite.to(mc, 5, {x:600, ease:new Ease(myEase)});
</pre></div>
 <p>In the above example, the anytime the Ease's <code>getRatio()</code> method is called, it
 would feed the first parameter as a ratio between 0 and 1 and the rest of the 3 parameters 
 would always be 0, 1, 1. This is all done transparently by TweenLite/TweenMax, so you 
 really shouldn't need to worry about this.</p>
 
 <p><strong>Copyright 2012, GreenSock. All rights reserved.</strong> This work is subject to the terms in <a href="http://www.greensock.com/terms_of_use.html">http://www.greensock.com/terms_of_use.html</a> or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.</p>
 
 <p></p>
<br>
<hr>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Ease()">Ease</a>(func:Function = null, extraParams:Array = null, type:Number = 0, power:Number = 0)</div>
<div class="summaryTableDescription">
   Constructor
   
   </div>
</td><td class="summaryTableOwnerCol">Ease</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getRatio()">getRatio</a>(p:Number):Number</div>
<div class="summaryTableDescription">
   Translates the tween's progress ratio into the corresponding ease ratio.</div>
</td><td class="summaryTableOwnerCol">Ease</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Ease()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Ease</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Ease(func:Function = null, extraParams:Array = null, type:Number = 0, power:Number = 0)</code><p>
   Constructor
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">func</span>:Function</code> (default = <code>null</code>)<code></code> &mdash; Function (if any) that should be proxied. This is completely optional and is in fact rarely used except when you have your own custom ease function that follows the standard ease parameter pattern like time, start, change, duration.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">extraParams</span>:Array</code> (default = <code>null</code>)<code></code> &mdash; If any extra parameters beyond the standard 4 (time, start, change, duration) need to be fed to the <code>func</code> function, define them as an array here. For example, the old Elastic.easeOut accepts 2 extra parameters in its standard equation (although the newer GreenSock version uses the more modern <code>config()</code> method for configuring the ease and doesn't require any extraPrams here)
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">type</span>:Number</code> (default = <code>0</code>)<code></code> &mdash; Integer indicating the type of ease where 1 is easeOut, 2 is easeIn, 3 is easeInOut, and 0 is none of these. 
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">power</span>:Number</code> (default = <code>0</code>)<code></code> &mdash; Power of the ease where Linear is 0, Quad is 1, Cubic is 2, Quart is 3, Quint (and Strong) is 4, etc.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="getRatio()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getRatio</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function getRatio(p:Number):Number</code><p>
   Translates the tween's progress ratio into the corresponding ease ratio. This is the heart of the Ease, where it does all its work.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">p</span>:Number</code> &mdash; progress ratio (a value between 0 and 1 indicating the progress of the tween/ease)
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; translated number
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
